package com.hnluchuan.staff.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.hnluchuan.core.model.BaseModel;

import javax.persistence.ManyToOne;
import com.hnluchuan.staff.model.User;
import java.util.Date;
import javax.persistence.JoinColumn;
import javax.persistence.FetchType;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 规章制度
 */
@Entity
@Table(name = "rules") 
public class Rules extends BaseModel {
	private static final long serialVersionUID = 1L;
	
	public Rules() {
	}
	
	public Rules(Long id) {
		this.id = id;
	}
	
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
	private Long id;
	/**
	 * 部门名
	 */
	@Column(name = "name")    		
	private String name;
	/**
	 * 编号
	 */
	@Column(name = "serialNum")    		
	private String serialNum;
	/**
	 * 状态，1-未上架，2-已上架，3-已下架
	 */
	@Column(name = "status")    		
	private Integer status;
	/**
	 * 标题
	 */
	@Column(name = "title")    		
	private String title;
	/**
	 * 概要
	 */
	@Column(name = "summary")    		
	private String summary;
	/**
	 * 缩略图
	 */
	@Column(name = "thumb")    		
	private String thumb;
	/**
	 * 规章制度文本内容
	 */
	@Column(name = "content")    		
	private String content;
	/**
	 * creator
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "creator")
	private User creator;
	/**
	 * createTime
	 */
	@DateTimeFormat(pattern = "")
	@Column(name = "createTime")
	private Date createTime;
	/**
	 * updator
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "updator")
	private User updator;
	/**
	 * updateTime
	 */
	@DateTimeFormat(pattern = "")
	@Column(name = "updateTime")
	private Date updateTime;
	// fields end
	
	/** id */
	public Long getId() {
    	return id;
    }
    /** id */
    public void setId(Long id) {
    	this.id = id;
    }
	/** 部门名 */
	public String getName() {
    	return name;
    }
    /** 部门名 */
    public void setName(String name) {
    	this.name = name;
    }
	/** 编号 */
	public String getSerialNum() {
    	return serialNum;
    }
    /** 编号 */
    public void setSerialNum(String serialNum) {
    	this.serialNum = serialNum;
    }
	/** 状态，1-未上架，2-已上架，3-已下架 */
	public Integer getStatus() {
    	return status;
    }
    /** 状态，1-未上架，2-已上架，3-已下架 */
    public void setStatus(Integer status) {
    	this.status = status;
    }
	/** 标题 */
	public String getTitle() {
    	return title;
    }
    /** 标题 */
    public void setTitle(String title) {
    	this.title = title;
    }
	/** 概要 */
	public String getSummary() {
    	return summary;
    }
    /** 概要 */
    public void setSummary(String summary) {
    	this.summary = summary;
    }
	/** 缩略图 */
	public String getThumb() {
    	return thumb;
    }
    /** 缩略图 */
    public void setThumb(String thumb) {
    	this.thumb = thumb;
    }
	/** 规章制度文本内容 */
	public String getContent() {
    	return content;
    }
    /** 规章制度文本内容 */
    public void setContent(String content) {
    	this.content = content;
    }
	/** creator */
	public User getCreator() {
    	return creator;
    }
    /** creator */
    public void setCreator(User creator) {
    	this.creator = creator;
    }
	/** createTime */
	public Date getCreateTime() {
    	return createTime;
    }
    /** createTime */
    public void setCreateTime(Date createTime) {
    	this.createTime = createTime;
    }
	/** updator */
	public User getUpdator() {
    	return updator;
    }
    /** updator */
    public void setUpdator(User updator) {
    	this.updator = updator;
    }
	/** updateTime */
	public Date getUpdateTime() {
    	return updateTime;
    }
    /** updateTime */
    public void setUpdateTime(Date updateTime) {
    	this.updateTime = updateTime;
    }
	
}
